﻿<UserControl x:Class="Big3.Hitbase.SoundEngineGUI.MiniPlayerUserControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Big3.Hitbase.SoundEngineGUI"
    xmlns:sr="clr-namespace:Big3.Hitbase.SharedResources;assembly=Big3.Hitbase.SharedResources"
    Background="Transparent" Height="85" SnapsToDevicePixels="True" >
    <UserControl.Resources>
        <Path x:Key="PlayButtonPath" Fill="#CFFFFFFF" Stroke="#80000000" Data="M 3 0 L 12 6 L 3 12 L 3 0" />
        <Path x:Key="PauseButtonPath" Fill="#CFFFFFFF" Stroke="#80000000" Data="M 2 0 L 6 0 L 6 12 L 2 12 M 8 0 L 12 0 L 12 12 L 8 12" />
    </UserControl.Resources>
    <DockPanel>
        <Grid DockPanel.Dock="Top">
            <Grid.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStopCollection>
                        <GradientStop Offset="0" Color="#8FFFFFFF" />
                        <GradientStop Offset="1" Color="#3FFFFFFF" />
                    </GradientStopCollection>
                </LinearGradientBrush>
            </Grid.Background>
            <TextBlock Text="{sr:Loc PreListen}" Margin="2" />
            <Button Margin="0,0,2,0" Background="Transparent" HorizontalAlignment="Right" 
                    VerticalAlignment="Center" Name="CloseButton" Click="CloseButton_Click" 
                    Style="{StaticResource ButtonStyleCloseButton}" ToolTip="{sr:Loc Close}">
            </Button>
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Image Name="ImageCover" Grid.Column="0" Stretch="Uniform" Width="65" Margin="5 0 0 5">
                <Image.Effect>
                    <DropShadowEffect Color="#000000" Opacity="0.3" />
                </Image.Effect>
            </Image>
            <Grid Grid.Column="1" Margin="5,2,7,2">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid Grid.Row="0">
                    <ProgressBar x:Name="ProgressBar" MouseLeftButtonDown="ProgressBar_MouseLeftButtonDown" />
                    <TextBlock x:Name="TextBlockStatus" HorizontalAlignment="Center" IsHitTestVisible="False" />
                </Grid>
                <TextBlock Grid.Row="1" TextTrimming="CharacterEllipsis" x:Name="TextBlockTrackName" />
                <Grid Grid.Row="2">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Button Grid.Column="0" Width="24" Height="24" Margin="2,2,2,2" Style="{StaticResource RoundGlassButton}" Background="#345BA0"
                            Name="ButtonPlay" Click="ButtonPlay_Click" HorizontalContentAlignment="Center" ToolTip="Wiedergabe"
                            Content="{StaticResource PauseButtonPath}">
                    </Button>
                    <Button Grid.Column="1" Width="24" Height="24" Margin="2,2,2,2" Style="{StaticResource RoundGlassButton}" Background="#345BA0" Name="ButtonStop" Click="ButtonStop_Click" HorizontalContentAlignment="Center" ToolTip="Stopp">
                        <Path Fill="#CFFFFFFF" Stroke="#80000000" Data="M 1,0 L 10,0 L 10,10 L 1, 10" />
                    </Button>
                    <Image Grid.Column="2" x:Name="ImagePlayNow" RenderOptions.BitmapScalingMode="NearestNeighbor" SnapsToDevicePixels="True" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,4,1,0" ToolTip="Sofort spielen" Source="/SoundEngineGUI;component/Images/PlayNow.png" Stretch="None" MouseEnter="ImagePlayNow_MouseEnter" MouseLeave="ImagePlayNow_MouseLeave" MouseLeftButtonDown="ImagePlayNow_MouseLeftButtonDown" />
                    <Image Grid.Column="3" x:Name="ImagePlayNext" RenderOptions.BitmapScalingMode="NearestNeighbor" SnapsToDevicePixels="True" Margin="0,4,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" ToolTip="Als nächstes spielen" Source="/SoundEngineGUI;component/Images/PlayNext.png" Stretch="None"  MouseEnter="ImagePlayNext_MouseEnter" MouseLeave="ImagePlayNext_MouseLeave" MouseLeftButtonDown="ImagePlayNext_MouseLeftButtonDown" />
                    <Image Grid.Column="4" x:Name="ImagePlayLast" RenderOptions.BitmapScalingMode="NearestNeighbor" SnapsToDevicePixels="True" Margin="0,4,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" ToolTip="Als letztes spielen" Source="/SoundEngineGUI;component/Images/PlayLast.png" Stretch="None"  MouseEnter="ImagePlayLast_MouseEnter" MouseLeave="ImagePlayLast_MouseLeave" MouseLeftButtonDown="ImagePlayLast_MouseLeftButtonDown" />
                </Grid>
            </Grid>
        </Grid>
    </DockPanel>
</UserControl>
